<template>
  <div>
    <el-tabs style="margin-top: 10px" tab-position="top" v-model="activeName" @tab-click="loadData1">
      <!-- <el-tab-pane label="执行标准" name="执行标准表表">
        <el-card>
          <el-table :data="standardList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column width="50" type="index"></el-table-column>
            <el-table-column align="center" label="标题" prop="grade"></el-table-column>
            <el-table-column align="center" label="标准类型" prop="grade"></el-table-column>
            <el-table-column align="center" label="标准号" prop="grade"></el-table-column>
            <el-table-column align="center" label="国家" prop="grade"></el-table-column>
            <el-table-column align="center" label="年份" prop="grade"></el-table-column>
            <el-table-column align="center" label="发布机构" prop="grade"></el-table-column>
            <el-table-column align="center" label="发布日期" prop="grade"></el-table-column>
            <el-table-column align="center" label="起草单位" prop="grade"></el-table-column>
            <el-table-column align="center" label="起草人" prop="grade"></el-table-column>
            <el-table-column align="center" label="实施日期" prop="grade"></el-table-column>
            <el-table-column align="center" label="备注" prop="grade"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
              <template slot-scope="scope"> -->
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <!-- <el-button type="text" @click="deleteData('执行标准表表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <a-popconfirm title="确定通过吗?" cancelText="取消" okText="确定" @confirm="() => passData(scope.row.id,'--')">
                  <a-icon slot="icon" type="question-circle-o" style="color: red" />
                  <a>通过</a>
                </a-popconfirm>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'--')">不通过</el-button>
              </template>
            </el-table-column>
          </el-table> -->
          <!-- 分页区 -->
          <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
        </el-card>
      </el-tab-pane> -->
      <el-tab-pane label="材料标签" name="材料标签表">
        <el-card>
          <el-table :data="materialLabelList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column align="center" type="index"></el-table-column>
            <el-table-column align="center" label="牌号" prop="mark" width="280"></el-table-column>
            <el-table-column align="center" label="材料标签" prop="productLabel" width="300"></el-table-column>
            <el-table-column align="center" label="上传时间" prop="time" width="300"></el-table-column>
            <el-table-column align="center" label="上传人" prop="username" width="300"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
            <!-- <el-table-column align="center" label="操作" fixed="right" width="250px"> -->
              <template slot-scope="scope">
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <el-button type="text" @click="deleteData('材料标签表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="passData(scope.row.id,'material_label')">通过</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'material_label')">不通过</el-button>
                <!-- <el-divider direction="vertical"></el-divider>
                <el-button @click="downloadFile" style="color:black" type="text" size="mini">文件下载</el-button> -->
              </template>
            </el-table-column>
          </el-table>
          <!-- 分页区 -->
          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
        </el-card>
      </el-tab-pane>
      <el-tab-pane label="相同相近牌号" name="国内外相同相近牌号表">
        <el-card>
          <el-table :data="markList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column align="center" width="50" type="index"></el-table-column>
            <el-table-column align="center" label="牌号" prop="mark" width="400"></el-table-column>
            <!-- <el-table-column align="center" label="国别" prop="country" width="400"></el-table-column> -->
            <el-table-column align="center" label="国别" width="400"><template slot-scope="scope"><p>{{ countryShow(scope.row.country) }}</p></template></el-table-column>
            <!-- <el-table-column align="center" label="原始国别" prop="preCountry" width="400"></el-table-column> -->
            <el-table-column align="center" label="原始国别" width="400"><template slot-scope="scope"><p>{{ countryShow(scope.row.preCountry) }}</p></template></el-table-column>
            <el-table-column align="center" label="相同牌号" prop="alias" width="280"></el-table-column>
            <el-table-column align="center" label="上传时间" show-overflow-tooltip prop="time" width="200"></el-table-column>
            <el-table-column align="center" label="上传人" show-overflow-tooltip prop="username" width="200"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
            <!-- <el-table-column align="center" label="操作" fixed="right" width="250px"> -->
              <template slot-scope="scope">
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <el-button type="text" @click="deleteData('国内外相同相近牌号表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="passData(scope.row.id,'Marks')">{{passDataShow(scope.row.state)}}</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'Marks')">{{rejectDataShow(scope.row.state)}}</el-button>
                <!-- <el-divider direction="vertical"></el-divider>
                <el-button @click="downloadFile" style="color:black" type="text" size="mini">文件下载</el-button> -->
              </template>
            </el-table-column>
          </el-table>
          <!-- 分页区 -->
          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
        </el-card>
      </el-tab-pane>
      <!-- <el-tab-pane label="测量标准" name="测量标准表">
        <el-card>
          <el-table :data="measureList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column width="50" type="index"></el-table-column>
            <el-table-column align="center" label="标题" prop="grade"></el-table-column>
            <el-table-column align="center" label="标准类型" prop="grade"></el-table-column>
            <el-table-column align="center" label="标准号" prop="grade"></el-table-column>
            <el-table-column align="center" label="国家" prop="grade"></el-table-column>
            <el-table-column align="center" label="年份" prop="grade"></el-table-column>
            <el-table-column align="center" label="发布机构" prop="grade"></el-table-column>
            <el-table-column align="center" label="发布日期" prop="grade"></el-table-column>
            <el-table-column align="center" label="起草单位" prop="grade"></el-table-column>
            <el-table-column align="center" label="起草人" prop="grade"></el-table-column>
            <el-table-column align="center" label="实施日期" prop="grade"></el-table-column>
            <el-table-column align="center" label="备注" prop="grade"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
              <template slot-scope="scope"> -->
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <!-- <el-button type="text" @click="deleteData('测量标准表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="passData(scope.row.id,'--')">通过</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'--')">不通过</el-button>
              </template>
            </el-table-column>
          </el-table> -->
          <!-- 分页区 -->
          <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
        </el-card>
      </el-tab-pane> -->
      <el-tab-pane label="生产商信息" name="生产商信息表">
        <el-card>
          <el-table :data="supplierList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column align="center" width="50" type="index"></el-table-column>
            <el-table-column align="center" label="名称" show-overflow-tooltip prop="producer"></el-table-column>
            <el-table-column align="center" label="国别" show-overflow-tooltip prop="country"></el-table-column>
            <el-table-column align="center" label="邮箱" show-overflow-tooltip prop="email"></el-table-column>
            <el-table-column align="center" label="网址" show-overflow-tooltip prop="website"></el-table-column>
            <el-table-column align="center" label="地址" show-overflow-tooltip prop="address"></el-table-column>
            <el-table-column align="center" label="电话" show-overflow-tooltip prop="telephone"></el-table-column>
            <el-table-column align="center" label="传真" show-overflow-tooltip prop="fax"></el-table-column>
            <el-table-column align="center" label="联系人" show-overflow-tooltip prop="staff"></el-table-column>
            <el-table-column align="center" label="上传时间" show-overflow-tooltip prop="time" width="200"></el-table-column>
            <el-table-column align="center" label="上传人" show-overflow-tooltip prop="username" width="200"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
            <!-- <el-table-column align="center" label="操作" fixed="right" width="250px"> -->
              <template slot-scope="scope">
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <el-button type="text" @click="deleteData('生产商信息表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="passData(scope.row.id,'producer_information')">通过</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'producer_information')">不通过</el-button>
                <!-- <el-divider direction="vertical"></el-divider>
                <el-button @click="downloadFile" style="color:black" type="text" size="mini">文件下载</el-button> -->
              </template>
            </el-table-column>
          </el-table>
          <!-- 分页区 -->
          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
        </el-card>
      </el-tab-pane>
      <el-tab-pane label="生产商标签" name="生产商标签表">
        <el-card
          ><el-table :data="supplierLabelList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column align="center" width="50" type="index"></el-table-column>
            <el-table-column align="center" label="材料制造商" show-overflow-tooltip prop="producer" width="400"></el-table-column>
            <el-table-column align="center" label="材料标签" show-overflow-tooltip prop="producerLabel" width="250"></el-table-column>
            <el-table-column align="center" label="上传时间" show-overflow-tooltip prop="time" width="250"></el-table-column>
            <el-table-column align="center" label="上传人" show-overflow-tooltip prop="username" width="280"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
            <!-- <el-table-column align="center" label="操作" fixed="right" width="250px"> -->
              <template slot-scope="scope">
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <el-button type="text" @click="deleteData('生产商标签表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="passData(scope.row.id,'manufacturer_label')">通过</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'manufacturer_label')">不通过</el-button>
                <!-- <el-divider direction="vertical"></el-divider>
                <el-button @click="downloadFile" style="color:black" type="text" size="mini">文件下载</el-button> -->
              </template>
            </el-table-column>
          </el-table>
        </el-card>
      </el-tab-pane>
      <el-tab-pane label="化学成分" name="化学成分表">
        <el-card
          ><el-table :data="chemList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column align="center" width="50" type="index"></el-table-column>
            <el-table-column align="center" label="牌号" show-overflow-tooltip prop="mark" width="400"></el-table-column>
            <el-table-column align="center" label="化学式" show-overflow-tooltip prop="chemicalFormula" width="200"></el-table-column>
            <el-table-column align="center" label="范围" show-overflow-tooltip prop="numberRange" width="200"></el-table-column>
            <el-table-column align="center" label="上传时间" show-overflow-tooltip prop="time" width="200"></el-table-column>
            <el-table-column align="center" label="上传人" show-overflow-tooltip prop="username" width="200"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
            <!-- <el-table-column align="center" label="操作" fixed="right" width="250px"> -->
              <template slot-scope="scope">
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <el-button type="text" @click="deleteData('化学成分表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="passData(scope.row.id,'chemical_component')">通过</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'chemical_component')">不通过</el-button>
                <!-- <el-divider direction="vertical"></el-divider>
                <el-button @click="downloadFile" style="color:black" type="text" size="mini">文件下载</el-button> -->
              </template>
            </el-table-column>
          </el-table>
          <!-- 分页区 -->
          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
        </el-card>
      </el-tab-pane>
      <!-- <el-tab-pane label="供应商信息" name="供应商信息表">
        <el-card
          ><el-table :data="supplierList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column width="50" type="index"></el-table-column>
            <el-table-column align="center" label="供应商名称" show-overflow-tooltip prop="name" width="200"></el-table-column>
            <el-table-column align="center" label="地址" show-overflow-tooltip prop="address" width="200"></el-table-column>
            <el-table-column align="center" label="联系人" show-overflow-tooltip prop="staff" width="200"></el-table-column>
            <el-table-column align="center" label="联系方式" show-overflow-tooltip prop="telephone" width="200"></el-table-column>
            <el-table-column align="center" label="邮箱" show-overflow-tooltip prop="email" width="200"></el-table-column>
            <el-table-column align="center" label="备注" show-overflow-tooltip prop="remarks" width="200"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
              <template slot-scope="scope"> -->
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <!-- <el-button type="text" @click="deleteData('供应商信息表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="passData(scope.row.id,'supplier_information')">通过</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'supplier_information')">不通过</el-button>
              </template>
            </el-table-column>
          </el-table> -->
          <!-- 分页区 -->
          <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
        </el-card>
      </el-tab-pane> -->
      <!-- <el-tab-pane label="测量仪器" name="测量仪器表">
        <el-card
          ><el-table :data="testInstrumentList" height="500px" style="margin: 10px 0 10px; width: 100%" border :header-cell-style="{ background: '#FAFAFA' }">
            <el-table-column width="50" type="index"></el-table-column>
            <el-table-column align="center" label="仪器编号" show-overflow-tooltip prop="num" width="200"></el-table-column>
            <el-table-column align="center" label="仪器名称" show-overflow-tooltip prop="instrument_name" width="200"></el-table-column>
            <el-table-column align="center" label="型号" show-overflow-tooltip prop="type" width="200"></el-table-column>
            <el-table-column align="center" label="生产商" show-overflow-tooltip prop="producer" width="200"></el-table-column>
            <el-table-column align="center" label="国别" show-overflow-tooltip prop="country" width="200"></el-table-column>
            <el-table-column align="center" label="备注" show-overflow-tooltip prop="remarks" width="200"></el-table-column>
            <el-table-column align="center" label="操作" fixed="right" width="180px">
              <template slot-scope="scope"> -->
                <!-- <el-button type="text" @click="checkRepeat(scope.row.id)">查重</el-button>
                <el-divider direction="vertical"></el-divider> -->
                <!-- <el-button type="text" @click="deleteData('测量仪器表',scope.row)">删除</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="passData(scope.row.id,'test_instrument')">通过</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text" @click="rejectData(scope.row.id,'test_instrument')">不通过</el-button>
              </template>
            </el-table-column>
          </el-table> -->
          <!-- 分页区 -->
          <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pagenum" :page-sizes="[10, 20]" :page-size="queryInfo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
        </el-card>
      </el-tab-pane> -->
    </el-tabs>
  </div>
</template>
<script>
import axios from './axios.mini.js'
import { Message } from 'element-ui'
export default {
  data() {
    return {
      activeName: '材料标签表',
      queryInfo: {
        pageNum: 1,
        pageSize: 10,
        type: '材料标签表'
      },
      total: 0,
      standardList: [], //执行标准
      materialLabelList: [], //材料标签
      markList: [], //牌号信息
      measureList: [], //测量标准
      supplierList: [], //生产商信息
      supplierLabelList: [], //生产商标签
      chemList: [], //化学成分
      testInstrumentList: [], //测量仪器
      supplierList: [],//供应商信息
    }
  },
  created() {
    this.loadData('材料标签表')
  },
  computed: {
    passDataShow() {
      return function(state) {
        if(state == '0') {
          return "通过"
        } else if(state == '1') {
          return "已通过"
        } else if(state == '-1') {
          return "未通过"
        } else {
          return "--"
        }
      }
    },
    rejectDataShow() {
      return function(state) {
        if(state == '0') {
          return "不通过"
        } else if(state == '1') {
          return "已通过"
        } else if(state == '-1') {
          return "未通过"
        } else {
          return "--"
        }
      }
    },
    countryShow() {
      return function(item, column) {
        // var item = row.country
        if(item == 'german') { return '德国'; }
        else if(item == 'england') { return '英国'; }
        else if(item == 'brazil') { return '巴西'; }
        else if(item == 'japan') { return '日本'; }
        else if(item == 'india') { return '印度'; }
        else if(item == 'america') { return '美国'; }
        else if(item == 'eu') { return '欧盟'; }
        else if(item == 'korea') { return '韩国'; }
        else if(item == 'taiwan') { return '中国台湾'; }
        else if(item == 'china') { return '中国'; }
        else if(item == 'russia') { return '俄罗斯'; }
        else if(item == 'turkey') { return '土耳其'; }
        else if(item == 'luxembourg') { return '卢森堡'; }
        else if(item == 'franch') { return '法国'; }
        else if(item == 'italy') { return '意大利'; }
        else return item;
      }
    },
  },
  methods: {
    // checkRepeat(id) { },
    rejectData(id,dbName) {
      console.log(id,dbName);
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/adminCheck/adminCheckNoPass',
        method: 'POST',
        data: {
          id,
          dbName,
        }
      }).then(res => {
        this.updateData(this.queryInfo.type)
        if(res.data.code == 200) {
          Message({
            showClose: true,
            message: '审核完成',
            type: 'success',
            customClass: "myMessageClass",
          })
        }
      })
    },
    passData(id,dbName) {
      console.log(id,dbName);
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/adminCheck/adminCheckPass',
        method: 'POST',
        data: {
          id,
          dbName,
        }
      }).then(res => {
        this.updateData(this.queryInfo.type)
        if(res.data.code == 200) {
          Message({
            showClose: true,
            message: '审核完成',
            type: 'success',
            customClass: "myMessageClass",
          })
        }
      })
    },
    deleteData(tab,row) {
      console.log(row.id,this.queryInfo.type);
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/checkTable/deleteById',
        method: 'GET',
        params: {
          type: this.queryInfo.type,
          id: row.id,
        }
      }).then(res => {
        this.updateData(this.queryInfo.type)
      })
    },
    loadData(tab) { // 初始化
      this.queryInfo.type = tab
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/checkTable/selectNoCheck',
        method: 'POST',
        data: this.queryInfo
      }).then(res => {
        this.materialLabelList = res.data.result.data.records
      })
    },
    loadData1(tab, event) { // 表格切换
      console.log("---------------",tab);
      this.queryInfo.type = tab._props.name
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/checkTable/selectNoCheck',
        method: 'POST',
        data: this.queryInfo
      }).then(res => {
        if (this.queryInfo.type == '执行标准表表') {
          this.standardList = res.data.result.data.records
        } else if (this.queryInfo.type == '材料标签表') {
          this.materialLabelList = res.data.result.data.records
        } else if (this.queryInfo.type == '国内外相同相近牌号表') {
          this.markList = res.data.result.data.records
        } else if (this.queryInfo.type == '测量标准表') {
          this.measureList = res.data.result.data.records
        } else if (this.queryInfo.type == '生产商信息表') {
          this.supplierList = res.data.result.data.records
        } else if (this.queryInfo.type == '生产商标签表') {
          this.supplierLabelList = res.data.result.data.records
        } else if (this.queryInfo.type == '化学成分表') {
          this.chemList = res.data.result.data.records
        } else if (this.queryInfo.type == '测量仪器表') {
          this.testInstrumentList = res.data.result.data.records
        } else if (this.queryInfo.type == '供应商信息表') {
          this.supplierList = res.data.result.data.records
        }
      })
    },
    updateData(tab) { // 重新查询
      this.queryInfo.type = tab
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/checkTable/selectNoCheck',
        method: 'POST',
        data: this.queryInfo
      }).then(res => {
        if (this.queryInfo.type == '执行标准表表') {
          this.standardList = res.data.result.data.records
        } else if (this.queryInfo.type == '材料标签表') {
          this.materialLabelList = res.data.result.data.records
        } else if (this.queryInfo.type == '国内外相同相近牌号表') {
          this.markList = res.data.result.data.records
        } else if (this.queryInfo.type == '测量标准表') {
          this.measureList = res.data.result.data.records
        } else if (this.queryInfo.type == '生产商信息表') {
          this.supplierList = res.data.result.data.records
        } else if (this.queryInfo.type == '生产商标签表') {
          this.supplierLabelList = res.data.result.data.records
        } else if (this.queryInfo.type == '化学成分表') {
          this.chemList = res.data.result.data.records
        } else if (this.queryInfo.type == '测量仪器表') {
          this.testInstrumentList = res.data.result.data.records
        } else if (this.queryInfo.type == '供应商信息表') {
          this.supplierList = res.data.result.data.records
        }
      })
    },
    //分页控制
    handleSizeChange(newSize) {
      this.queryInfo.pageSize = newSize
      this.loadData1()
    },
    handleCurrentChange(newPage) {
      this.queryInfo.pageNum = newPage
      this.loadData1()
    },
  }
}
</script>

<style scoped></style>
